package demo.threadpool;

import java.util.Random;

public class Job {
	
	private String name;
	
	private Random random = new Random();
	
	public Job(String name){
		this.name = name;
	}
	
	public void make(){
		int costTime = random.nextInt(10000);
		try {
			Thread.sleep(costTime);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		System.out.println(this.name + "完成，耗时：" + costTime + "ms");
	}
}
